const mongoose =require("mongoose")
mongoose.connect("mongodb://127.0.0.1/users",err=>{
    if(err){
        console.log(err);
        return;
    }
    console.log('数据库连接成功');

})

let schema = mongoose.Schema({
    name:String,
    age:Number
})

let userModel = mongoose.model("lists",schema);

module.exports = userModel;